package com.zhaorui.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zhaorui.component.BusinessException;
import com.zhaorui.entity.ActivityTitle;
import com.zhaorui.service.ActivityTitleService;
import com.zhaorui.mapper.ActivityTitleMapper;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.HashMap;
import java.util.List;

/**
 *
 */
@Service
public class ActivityTitleServiceImpl extends ServiceImpl<ActivityTitleMapper, ActivityTitle>
        implements ActivityTitleService {

    @Autowired
    private ActivityTitleMapper activityTitleMapper;

    //活动综合查询
    @Override
    public List<HashMap> queryTitle(ActivityTitle activityTitle) {
        return activityTitleMapper.queryTitle (activityTitle);
    }


    //删除
    @Override
    public boolean delete(Integer id) {
        ActivityTitle activityTitle = null;
        int num = activityTitleMapper.deleteById (id);
        if (num == 1) {
            return true;
        }
        return false;
    }


    /**
     * 批量删除
     *
     * @param ids 需要删除的ID
     * @return 结果
     */
//    @Override
//    @Transactional
//    public int delTitle(long[] ids) {
//        int num = activityTitleMapper.delTitle (ids);
//        return num;
//    }
}




